CFLAGS := -g -O0 -Wall

create := 01_create.c
sum_sqr := 02_sum_sqr.c
sum_sqr_pthread := 03_sum_sqr_pthread.c
cancel := cancel.c
mutex_lock := 04_mutex_lock.c
mqueue := 05_mqueue.c

create: $(create)
	-gcc $^ -o $@
	-./$@
	-rm ./$@
sum_sqr: $(sum_sqr)
	-gcc $^ -o $@
	-./$@
	-rm ./$@
sum_sqr_pthread: $(sum_sqr_pthread)
	-gcc $^ -o $@
	-./$@
	-rm ./$@
cancel: $(cancel)
	-gcc $^ -o $@
	-./$@
	-rm ./$@
mutex_lock: $(mutex_lock)
	-gcc $^ -o $@
	-./$@
	-rm ./$@
mqueue: $(mqueue)
	-gcc $^ -o $@
	-./$@
	-rm ./$@

